<template>
  <el-dialog v-model="isShowDialog" title="登录" width="300px">
    <el-form :model="loginForm">
      <el-form-item>
        <el-input placeholder="手机号" :prefix-icon="Phone" v-model="loginForm.username" />
      </el-form-item>
      <el-form-item>
        <el-input placeholder="密码" :prefix-icon="Lock" type="password" v-model="loginForm.password" />
      </el-form-item>
      <el-form-item>
        <el-button class="w-96" type="primary" @click="onSubmit">登录</el-button>
      </el-form-item>
      <el-alert title="账号密码未加密传输" type="success" />
    </el-form>
  </el-dialog>
</template>

<script lang="ts" setup>
import { toRefs } from 'vue'
import { useUserStore } from '@/stores/user'
import { Lock, Phone } from '@icon-park/vue-next'
const { isShowDialog, loginForm, onSubmit } = toRefs(useUserStore())
</script>

<style lang="less" scoped></style>
